#ifndef CORNELL_BOX_SAMPLE_H
#define CORNELL_BOX_SAMPLE_H
#include "SampleBase.h"
#include "HitableList.h"
#include "ImageParam.h"
#include "Rectangle.h"
#include "Lambertian.h"
#include "Camera.h"
#include "Box.h"
#include "Sphere.h"
#include "Metal.h"
#include "Glass.h"
namespace RayTracer 
{
	class CornellBoxSample : public SampleBase 
	{
	public:
		CornellBoxSample() = default;
		~CornellBoxSample() = default;
		void Init();
		void Render();
		void ImGui();
		void ShutDown();
	private:
		vec3 RayColor(const Ray& r, const vec3& background, const Hitable& world, int depth);
		vec3 RayColor(const Ray& r, const Hitable& world, int depth);
	private:
		HitableList world;
		ImageParam mImageParam; // output image
		int samples_per_pixel = 10;
		int maxDepth = 10;
		bool isNormal = false;
		bool isGenerate;
		int curIndex;
		// camera
		Camera camera;
		vec3 lookfrom;
		vec3 lookat;
		float fov;

		// sky color
		vec3 background;
		vec3 upColor;
		vec3 downColor;
		vec3 metalColor;
		float roughness;
		float left, right;
	};
}
#endif // !CORNELL_BOX_SAMPLE_H
